﻿using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Text;
using AutoMapper;
using System.Reflection;

namespace AppSocketService
{
    public static  class MapperConfiguration
    {
        public static IServiceCollection AddMapperConfiguration(this IServiceCollection services)
        {
            AutoMapper.Mapper.Initialize(s =>
            {
                s.AddProfiles(Assembly.GetExecutingAssembly());
                s.CreateMissingTypeMaps = true;
            });
            return services;
        }
    }
}
